home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.05 May 97 / TidyHeap / CTidyHeapDebugStrLogger_AC.cp < prev    next >
Encoding:
Text File  |  1997-04-14  |  1.7 KB  |  57 lines  |  [TEXT/MPS ]

  1. //----------------------------------------------------------------------------------------
  2. // CTidyHeapDebugStrLogger_AC.cp
  3. // Copyright © 1984-97 by Apple Computer, Inc. All rights reserved.
  4. //----------------------------------------------------------------------------------------
  5.  
  6. #ifndef __CTidyHeap_AC__
  7. #include "CTidyHeap_AC.h"
  8. #endif
  9.  
  10. #if qTidyHeap
  11.  
  12. #ifndef __CTidyHeapDebugStrLogger_AC__
  13. #include "CTidyHeapDebugStrLogger_AC.h"
  14. #endif
  15.  
  16. #ifndef _STRING
  17. #include <string.h>
  18. #endif
  19. #ifndef __TEXTUTILS__
  20. #include <TextUtils.h>
  21. #endif
  22. //========================================================================================
  23. // class CTidyHeapDebugStrLogger_AC
  24. //========================================================================================
  25.  
  26. //----------------------------------------------------------------------------------------
  27. // CTidyHeapDebugStrLogger_AC constructor
  28. //----------------------------------------------------------------------------------------
  29.  
  30. CTidyHeapDebugStrLogger_AC::CTidyHeapDebugStrLogger_AC(Boolean wantsHalt = true) :
  31. fWantsHalt(wantsHalt) 
  32. {
  33. }
  34.  
  35. //----------------------------------------------------------------------------------------
  36. // CTidyHeapDebugStrLogger_AC destructor
  37. //----------------------------------------------------------------------------------------
  38.  
  39. CTidyHeapDebugStrLogger_AC::~CTidyHeapDebugStrLogger_AC() 
  40. {
  41. }
  42.  
  43. //----------------------------------------------------------------------------------------
  44. // CDebugStrLogge::Log
  45. //----------------------------------------------------------------------------------------
  46.  
  47. void CTidyHeapDebugStrLogger_AC::Log(char *inStr) 
  48. {     
  49.     if(!fWantsHalt)
  50.         ::strcat(inStr, ";g");
  51.     
  52.     ::c2pstr(inStr); 
  53.     ::DebugStr((unsigned char*) inStr);
  54. }
  55.  
  56. #endif
  57.